<?php
    include "../../class/farm.class.php";
    include "../../class/crop.class.php";
    include "../../class/date.class.php";
    include "../../function/functionPHP.php";
    
    $farmID=$_POST["farmID"];
    $farmClass=new farm($farmID);
    
    $dateClass=new date();
    $startDate=$dateClass->dateDisplayToSQL($_POST["startDate"]);
    $endDate=$dateClass->dateDisplayToSQL($_POST["endDate"]);
    
    $cropClass=new crop($farmID,$startDate,$endDate);
    
    header("location:../../?page=member/crop/cropList&farmID=$farmID");